﻿Imports System.Collections.ObjectModel
Imports GalaSoft.MvvmLight

Namespace FL_8x0.Model

    Public Class UserModel
        Inherits ViewModelBase
        Private _username As String
        Private _password As String
        Private _menuModals As ObservableCollection(Of MenuModel)

        Private _permissionList As ObservableCollection(Of Boolean)
        Private _lastUsedPassword As String
        Private _errorCount As UShort
        Private _deadline As Date


        Public Sub New()
            _username = ""
            _password = ""
            _permissionList = New ObservableCollection(Of Boolean) From {
                False, False,
                False, False, False,
                False, False, False,
                False, False, False}
        End Sub

        Public Sub New(username As String, password As String, menuModals As ObservableCollection(Of MenuModel))
            _username = username
            _password = password
            _menuModals = menuModals
        End Sub

        Public Property Username As String
            Get
                Return _username
            End Get
            Set
                _username = Value
                RaisePropertyChanged()
            End Set
        End Property

        Public Property Password As String
            Get
                Return _password
            End Get
            Set
                _password = Value
                RaisePropertyChanged()
            End Set
        End Property

        Public Property MenuModals As ObservableCollection(Of MenuModel)
            Get
                Return _menuModals
            End Get
            Set
                _menuModals = Value
            End Set
        End Property

        Public Property PermissionList As ObservableCollection(Of Boolean)
            Get
                Return _permissionList
            End Get
            Set
                _permissionList = Value
            End Set
        End Property

        Public Property LastUsedPassword As String
            Get
                Return _lastUsedPassword
            End Get
            Set
                _lastUsedPassword = Value
            End Set
        End Property

        Public Property ErrorCount As UShort
            Get
                Return _errorCount
            End Get
            Set
                _errorCount = Value
            End Set
        End Property

        Public Property Deadline As Date
            Get
                Return _deadline
            End Get
            Set
                _deadline = Value
            End Set
        End Property
    End Class
End Namespace